/*
@hehung
2023-2-8
转载请注明出处，版权由@hehung所有
email: 1398660197@qq.com
wechat: hehung95
*/

#ifndef APP_LED_H_
#define APP_LED_H_

#include "app_common.h"

#define LED_DEMO_PWM               (0U)
#define LED_DEMO_IO                (1U)
#define LED_MODE_BOTH              (2U)
#define LED_CTRL_MODE              (LED_MODE_BOTH)

// Total number of leds
#if ((LED_CTRL_MODE == LED_DEMO_IO) || (LED_CTRL_MODE == LED_MODE_BOTH))
#define LED_TOTAL_NUM              (1U)
#define LED_3                      (0U)
#endif 

#if ((LED_CTRL_MODE == LED_DEMO_PWM) || (LED_CTRL_MODE == LED_MODE_BOTH))
#define LED_PWM_TOTAL_NUM          (2U)
#define LED_2                      (0U)
#define LED_1                      (1U)
#endif

extern void Led_Init(void);
#if ((LED_CTRL_MODE == LED_DEMO_IO) || (LED_CTRL_MODE == LED_MODE_BOTH))
extern void Led_Ctrl(uint8_t led_num, uint8_t led_level);
#endif 
#if ((LED_CTRL_MODE == LED_DEMO_PWM) || (LED_CTRL_MODE == LED_MODE_BOTH))
extern void Led_PwmCtrl(uint8_t led_num, uint32_t duty_cycle);
#endif
extern void Led_LED_3_PwmSet(void);
extern void Led_LED_2PwmSet(uint32_t pwm_set);
extern void Led_ChangeStatus(uint8_t flag);
extern void Led_LampPwmCtrl(uint8_t pwm_value);
extern uint8_t Led_LampPwmGet(void);

#endif /* APP_LED_H_ */
